/**
 * @ProjectName:Backend
 * @Title: BaseErrorInfoInterface
 * @Package com.phrp.exception
 * @Description: 异常处理枚举类 实现异常服务接口类的方法，并且自定义数据操作异常的类型
 * @author SuShuChao
 * @date 2024/4/17 13:34
 * @version V1.0
 * Copyright (c) 2024, 2034279227@qq.com All Rights Reserved.
 */

package com.phrp.util.returnResult;

import com.phrp.exception.BaseErrorInfoInterface;

public enum ReturnInfoEnum implements BaseErrorInfoInterface {
    // 数据操作异常定义
    SUCCESS("200", "请求成功!"),
    USERINFO_EMPTY("201", "用户不存在!"),
    PASSWORD_ERROR("202", "密码错误!"),
    PASSWORD_EQUALS("203", "原密码与新密码相同，请重新输入!"),
    GET_CODE_ERROR("204", "验证码获取失败！"),
    BODY_NOT_MATCH("400", "请求的数据格式不符!"),
    SIGNATURE_NOT_MATCH("401", "登录过期或用户不存在!"),
    DATA_FAIL("402","数据库操作失败！"),
    TOKEN_EXPIRED("403", "token无效或过期！"),
    UPLOAD_FAIL("404", "文件上传失败!"),
    // DATA_FOUND("405", "数据已存在！"),
    // CODE_NOT_MATCH("406", "验证码错误!"),
    // CODE_TIME_OUT("407", "验证码已过期!"),
    // PASSWORD_NOT_MATCH("408", "密码不一致!"),
    // INTERNAL_SERVER_ERROR("500", "服务器内部错误!"),
    SERVER_BUSY("503", "服务器正忙，请稍后再试!");
 
    /**
     * 错误码
     */
    private final String resultCode;
 
    /**
     * 错误描述
     */
    private final String resultMsg;
 
    ReturnInfoEnum(String resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }
 
    @Override
    public String getResultCode() {
        return resultCode;
    }
 
    @Override
    public String getResultMsg() {
        return resultMsg;
    }
}